package sk.tuke.constraintbuilder.model;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;

public class Annotation implements ILeaf {
	
	private String name;
	private Context context;
	private Integer minOccurs;
	private Integer maxOccurs;

	public Annotation(){
		//Empty constructor
	}
	
	public Annotation(String name){
		this.name = name;
	}
	
	@XmlAttribute(required = true)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@XmlAttribute(required = false)
	public Context getContext() {
		return context;
	}

	public void setContext(Context context) {
		this.context = context;
	}

	@XmlAttribute(required = false)
	public Integer getMinOccurs() {
		return minOccurs;
	}

	public void setMinOccurs(Integer minOccurs) {
		this.minOccurs = minOccurs;
	}

	@XmlAttribute(required = false)
	public Integer getMaxOccurs() {
		return maxOccurs;
	}

	public void setMaxOccurs(Integer maxOccurs) {
		this.maxOccurs = maxOccurs;
	}

	@Override
	public String toString() {
		return name;
	}
}
